This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
Make LR contribution comparable across pathways, sources and targets #700
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation:
Find the LR contributions that are comparable across pathways, sources, and targets. After using this PR, users can rank the LR from various pathways. Importantly, the contribution value is 'global' and comparable across various pathways, sources, and targets.
For example, now I am examing LRs from multiple pathways
signaling = c('ICOS', 'PD-L1', 'TIGIT', 'SELE')
.Problem:
For the same LR, the contributions are different depending on the selected pathways, sources and targets. Because the contributions are 'relative'. See line:
CellChat/R/analysis.R
Line 86 in 418b660
Solution:
I modified the original
netAnalysis_contribution
into another functionnetAnalysis_contribution_allLR
. It has two improvements: 1) comparing multiple pathways, and 2) avoiding the relative prob.Misc:
Unresolved issue:
I did not use the
vertex.receiver
para and I did not find a demo for it. I am not sure how to handle the normalization part for the 'hierarchy1' and 'herarchy2'.See the code block in: https://github.com/Puriney/CellChat/blob/25fac78c144c831a01eddb239537826ed17979f3/R/analysis.R#L338-L344